<?php $this->pageTitle = '权限管理'; ?>
<!-- h2 stays for breadcrumbs -->
<h2><a href="#">后台管理</a> &raquo; <a href="#" class="active"><?php __('权限');?></a></h2>
<div id="main">
<div class="groups index">
<p>
<?php echo $paginator->counter(array('format' => '第 %page% 页，共 %pages% 页, 显示当前 %current% 记录，共有 %count% 记录, 开始于 %start%, 结束于 %end%')); ?></p>
<table cellpadding="0" cellspacing="0">
<tr>
	<td><?php echo $paginator->sort('ID', 'id');?></td>
	<td><?php echo $paginator->sort('组名', 'name');?></td>
	<td><?php echo $paginator->sort('创建时间', 'created');?></td>
	<td><?php echo $paginator->sort('修改时间');?></td>
	<td class="actions"><?php __('操作');?></td>
</tr>
<?php
$i = 0;
foreach ($groups as $group):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="odd"';
	}
?>
	<tr<?php echo $class;?>>
		<td>
			<?php echo $group['Group']['id']; ?>
		</td>
		<td>
			<?php echo $group['Group']['name']; ?>
		</td>
		<td>
			<?php echo $group['Group']['created']; ?>
		</td>
		<td>
			<?php echo $group['Group']['modified']; ?>
		</td>
		<td class="action">
			<?php echo $html->link(__('浏览', true), array('action' => 'view', $group['Group']['id']), array('class' => 'view')); ?>
			<?php echo $html->link(__('修改', true), array('action' => 'edit', $group['Group']['id']), array('class' => 'edit')); ?>
			<?php echo $html->link(__('删除', true), array('action' => 'delete', $group['Group']['id']), array('class' => 'delete'), sprintf(__('Are you sure you want to delete # %s?', true), $group['Group']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
<?php    
echo $paginator->prev('« 上一页 ', null, null, array('class' => ''));  
echo $paginator->numbers();  
echo $paginator->next(' 下一页 »', null, null, array('class' => ''));
?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('新建组', true), array('action' => 'add')); ?>
		<?php echo $html->link(__('用户管理', true), array('controller' => 'users', 'action' => 'index')); ?>
		<?php echo $html->link(__('新建用户', true), array('controller' => 'users', 'action' => 'add')); ?> </li>
	</ul>
</div>
</div>
